import React, { memo, Suspense } from "react";
import { Provider } from "react-redux";

import routes from "./router";
import { renderRoutes } from "react-router-config";
import store from "./store";
import { BrowserRouter } from "react-router-dom";
import Header from './components/Header'
import MyFoot from './components/MyFoot'
export default memo(function App() {

  return (
    <Provider store={store}>
      <BrowserRouter>
        <Header></Header>
        <Suspense fallback={<div>page loading</div>}>{renderRoutes(routes)}</Suspense>
      </BrowserRouter>
      <MyFoot></MyFoot>
    </Provider>
  );
});
